package com.kuang.demo3;

import com.kuang.demo3.impl.Circle;
import com.kuang.demo3.impl.Square;

/**
        * @Title:
        * @Description:
        * @Author: zx
        * @Date: create in 13:25 2020/8/7
        * @Version: 1.0
        */
public class ProtoTypeShape {
    public static void main(String[] args) {
        ProtoTypeManager pm = new ProtoTypeManager();
        Shape circle = pm.getShape("Circle");
        circle.countArea();
        Shape rectangle = pm.getShape("Rectangle");
        rectangle.countArea();
        pm.addShape("Square",new Square());
        Shape square = pm.getShape("Square");
        square.countArea();
    }
}
